<?php

Class Register_model extends CI_Model {

    public function register_data($fname, $lname, $gender, $phone, $email, $pdsha1, $loc) {

        $data1 = array(
            field('use_first_name') => $fname,
            field('use_last_name') => $lname,
            field('use_gender') => $gender,
            field('use_phone') => $phone,
            field('use_email') => $email,
            field('use_password') => $pdsha1,
           field('pos_id') => $loc,
        );

        return $this->db->insert(table('tbl_users'), $data1);
    }

    public function tbl_position() {
        $this->db->select('pos_id');
        $this->db->from('tbl_positions');
        $this->db->where('pos_title', 'location_owner');
        $query = $this->db->get();
        return $query;
    }

}

?>
